﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IPageable<DR.WebUI.Models.Manager.ReportsOverviewModel>>" %>
<%@ Import Namespace="DR.WebUI.Models.Manager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Developer Tasks
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h3>Developer Tasks</h3>

    <div style="cursor: pointer; border: silver 1px solid; background-color:#e2e2e2; width:150px; height:40px" id="addReport"> 
        <div style="margin:5px;">
            <div style="float:left;">
                <img alt="" src="../../Content/images/add.png" /> 
            </div>
            <div style="float:left; margin-left:10px; margin-top:8px;">
                Add new task
            </div>
        </div>
    </div>
    <br />

    <div id="tableStyle">
        <table style="width:100%;">
            <thead>
                <tr>
                    <th>Report ID</th>
                    <th>Project</th>
                    <th>Developer</th>
                    <th>Report Title</th>
                    <th>Reported Date</th>
                    <th>Create Date</th>
                    <th>Hours</th>
                    <th>State</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>            
                <% foreach (ReportsOverviewModel r in Model.Page) %>
                <% { %>
                        <tr>
                            <%:Html.Hidden("Description", r.Description) %>
                            <td class="reportID"><%: r.ReportID %></td>
                            <td class="project"><%: r.Project %></td>
                            <td><%: r.Developer %></td>
                            <td class="reportTitle"><%: r.ReportTitle %></td>
                            <td><%: r.DateReporting %></td>
                            <td><%: r.DateCreate %></td>
                            <td><%: r.Hours %></td>
                            <td><%: r.State %></td>
                            <td style="width:30px;">
                                 <div>
                                    <%: Html.Hidden("TaskID_" + r.ReportID, r.ReportID, new { @class = "task-id" })%>
                                    <div class="editTask" title="Edit"></div>
                                 </div>
                            </td>                        
                        </tr>        
                <% } %>
            </tbody>
        </table>
    </div>
    <div>
        <%=Html.Pagination() %>
    </div>
    <%Html.RenderPartial("ModalAddTask");%>
    <%Html.RenderPartial("ModalEditTask");%>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="headPlaceHolder" runat="server">    

    <script type="text/javascript" src="<%= Url.Content("~/Scripts/jquery-1.4.4.min.js")%>"></script>
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/jquery-ui-1.8.7.custom.min.js")%>"></script>

    <script type="text/javascript" src="<%= Url.Content("~/Scripts/Report/modal-add-report.js")%>"></script>
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/Report/modal-edit-report.js")%>"></script>

    <link type="text/css" href="/Content/jquery/jquery-ui-1.8.7.custom.css" rel="stylesheet" />
    <link type="text/css" href="/Content/css/Awesome.css" rel="stylesheet"  />

    <script type="text/javascript" src="<%= Url.Content("~/Scripts/jquery.form.js")%>"></script>
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/Awesome.js")%>"></script>

</asp:Content>
